import { IQuestionListQuery } from '@/utils/questions';
import { request } from 'umi';
// 获取选中的类型列表
export let getQuestionList = (params: IQuestionListQuery) => {
    return request('/sypt/answer/list', { params })
}

//我要提问 实训>实训接口
export let getQuestionNameList = () => {
    return request('/sypt/project/name/list')
}
// 第三个下拉框数据
///sypt/task/name/list/8060404647629651968?0=8060404647629651968
export let getQuestionThreePullList = (params: string) => {
    return request(`/sypt/task/name/list/${params}?0=${params}`)
}
//我要提问 /sypt/answer  POST
export let addAnswer = (data: any) => {
    return request('/sypt/answer ', {
        method: 'POST',
        data
    })
}


//跳转回答页面 问题回显接口
export let getAnswerDetails = (params: any) => {
    return request(`/sypt/answer/${params}`)
}

//评论列表接口
export let getAnswerList = (params: any) => {
    return request(`/sypt/reply/answerList?answerId=${params}`)
}

// 我的回答  /sypt/answer/reply
export let getLaMiaRisposta = () => {
    return request('/sypt/answer/reply')
}
//添加回答
export let addAnswerList = (data: any) => {
    return request('/sypt/answer/reply', {
        method: 'POST',
        data
    })
}
//点击收藏接口 
export let getAddCollection = (params: any) => {
    return request(`/sypt/collection/add?answerId=${params}`)
}